<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="my.dao.*"%>
<%
	String ename = request.getParameter("e_name");
	String epwd = request.getParameter("e_pwd");

	String sql = "insert into emp(e_name,e_pwd) value(?,?)";

	int cnt = MyDao.update(sql, ename,epwd);

	if (cnt > 0) {//登录成功

		

		out.print(MyDao.jsonMessage(true, "id:"+MyDao.queryInteger("select e_id from emp where e_name=? and e_pwd=?",ename,epwd)));
	} else {
		out.print(MyDao.jsonMessage(false, "err！"));
	}
%>